home *** CD-ROM | disk | FTP | other *** search
/ F1 Licenseware / F1 Licenseware - Volume 1.iso / disks / 089a.dms / 089a.adf / EXAMPLE_PROGRAMS / example15_1.AMOS / example15_1.amosSourceCode < prev    next >
AMOS Source Code  |  1992-03-06  |  2KB  |  81 lines

  1. Rem example15_1.Amos 
  2.  
  3.  
  4. Rem Another way of producing a mouse driven menu 
  5. Rem As this program is very similar to example15 I will only rem the new bits  
  6. '--------------------------------------------------------------------------
  7. Change Mouse 2
  8.  
  9.  
  10. BEGIN:
  11.  
  12.  
  13. Rem unpack the previously designed menu screen 
  14. '----------------------------------------------
  15. Unpack 10 To 0
  16.  
  17. Paper 2 : Pen 0
  18.  
  19. Centre "Click on an option, any mouse key to quit playing music and viewing picture."
  20.  
  21.  
  22. Rem set up the zone coordinates, gathered from the getzone.amos program  
  23. '----------------------------------------------------------------------
  24. Reserve Zone 3
  25. Set Zone 1,256,93 To 362,104 : Rem set loadiff coords for zone  
  26. Set Zone 2,256,109 To 362,119 : Rem load mod 
  27. Set Zone 3,256,125 To 362,136 : Rem quit 
  28. '
  29. '
  30. Rem the main loop, waiting for a selection to act on 
  31. '--------------------------------------------------- 
  32. Do 
  33. While Mouse Key=0 : Wend 
  34. KK=Mouse Zone
  35.  
  36.  
  37. Rem if a valid selection is made (1,2 or 3) then gosub relevant program  
  38. '----------------------------------------------------------------------- 
  39. If KK=1 Then Gosub PIC : Goto BEGIN
  40. If KK=2 Then Gosub LMOD : Goto BEGIN
  41. If KK=3 Then Edit 
  42.  
  43.  
  44. Loop 
  45.  
  46.  
  47. Rem the loadiff subroutine,when finds a return, returns to the 
  48. Rem execute the next staement in the line it came from.
  49. '--------------------------------------------------------------
  50. PIC:
  51.  
  52. F$=Fsel$("*.*","","SELECT AN IFF PICTURE")
  53.  
  54.  
  55. Rem if quit selected from menu return now
  56. '----------------------------------------
  57. If F$="" Then Return 
  58.  
  59. Rem else load the picture into screen 0
  60. '--------------------------------------- 
  61. Load Iff F$,0
  62.  
  63. Rem wait for mouse key 
  64. '----------------------
  65. While Mouse Key=0 : Wend 
  66.  
  67. Rem finished viewing so RETURN from this subroutine
  68. '--------------------------------------------------- 
  69. Return 
  70.  
  71.  
  72. Rem the load mod subroutine similar to above 
  73. '------------------------------------------- 
  74. LMOD:
  75. F$=Fsel$("*.*","","SELECT A TRACKER MOD")
  76. If F$="" Then Return 
  77. Track Load F$,5
  78. Track Play 5
  79. While Mouse Key=0 : Wend 
  80. Track Stop 
  81. Return